<?php

use yii\db\Migration;

/**
 * Handles the creation of table `package_initiation`.
 */
class m171026_065439_create_package_initiation_table extends Migration
{
    /**
     * @inheritdoc
     * 资产包尽调评估立项信息表
     */
    public function up()
            {
        $this->createTable('package_initiation', [
            'id' => $this->bigPrimaryKey(),
            'package_id' => $this->bigInteger(),
            'basic' => $this->text()->comment('基本情况'),
            'seller_files' => $this->text()->comment('卖家提供的信息资料'),
            'deal_method' => $this->text()->comment('资产成交期限和方式'),
            'partners' => $this->text()->comment('当地共同处置资产包的合作伙伴情况'),
            'law' => $this->text()->comment('当地司法环境对所立项目的法律支持'),
            'bargain' => $this->text()->comment('卖家报价、未来价格可谈判空间'),
            'other_notes' => $this->text()->comment('其他需要说明的事项'),
//            'price' => $this->text()->comment('报价信息'),
            'reason' => $this->text()->comment('申请立项的理由'),
            'pass_date' => $this->text()->comment('立项通过时间'),
            //团队情况
            'pre_evaluation' => $this->text()->comment('预评估人员'),
            'due_diligence' => $this->text()->comment('尽调成员'),
            'other_team_notes' => $this->text()->comment('团队其它说明'),
            //报价信息
            'price_detail' => $this->text()->comment('报价信息详情'),
            'created_at' => $this->timestamp()->comment('创建时间'),
            'lock_user' => $this->integer()->comment('上锁用户'),
            'lock_timestamp' => $this->string()->comment('上锁时间'),
        ]);
    }

    /**
     * @inheritdoc
     */
    public function down()
    {
        $this->dropTable('package_initiation');
    }
}
